import { createRouter, createWebHashHistory } from 'vue-router'
const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    {
      path: '/',
      redirect: '/home',
    },
    {
      path: '/home',
      name: 'home',
      meta: {
        index: 1,
      },
      component: () =>
        import(/* webpackChunkName: "home" */ '../view/home.vue'),
    },
    {
      path: '/guide',
      name: 'guide',
      meta: {
        index: 2,
      },
      component: () => import(/* webpackChunkName: "guide" */ '../view/guide'),
      children: [
        {
          path: 'buyMedicineServe',
          name: 'buyMedicineServe',
          meta: {
            index: 3,
          },
          component: () =>
            import(
              /* webpackChunkName: "guide" */ '../view/guide/buyMedicineServe'
            ),
        },
        {
          path: 'medicineGuides',
          name: 'medicineGuides',
          meta: {
            index: 3,
          },
          component: () =>
            import(
              /* webpackChunkName: "guide" */ '../view/guide/medicineGuides'
            ),
        },
        {
          path: 'heathSelfServe',
          name: 'heathSelfServe',
          meta: {
            index: 3,
          },
          component: () =>
            import(
              /* webpackChunkName: "guide" */ '../view/guide/heathSelfServe'
            ),
        },
        {
          path: 'selfDocument',
          name: 'selfDocument',
          meta: {
            index: 3,
          },
          component: () =>
            import(
              /* webpackChunkName: "guide" */ '../view/guide/selfDocument'
            ),
        },
      ],
    },
    {
      path: '/test2',
      name: 'test2',
      meta: {
        index: 2,
      },
      component: () =>
        import(/* webpackChunkName: "test" */ '../view/test/test2.vue'),
    },
    {
      path: '/test3',
      name: 'test3',
      meta: {
        index: 2,
      },
      component: () =>
        import(/* webpackChunkName: "test" */ '../view/test/test3.vue'),
    },
  ],
})
export default router
